package org.cp.dao;

import java.sql.Connection;
import java.util.List;

public interface DaoHelper {
	boolean add(String sql, Object... args);

	boolean add(String sql, Connection conn, Object... args);

	int update(String sql, Object... args);

	int update(String sql, Connection conn, Object... args);

	boolean delete(String sql, Object... args);

	boolean delete(String sql, Connection conn, Object... args);

	Object getObject(String sql, Class obj, Object... args);

	Object getObject(String sql, Connection conn, Class obj, Object... args);

	List<Object> getList(String sql, Class obj, Object... args);

	String queryForString(String sql, Object... args);

	Long queryForLong(String sql, Object... args);

	Boolean queryForBoolean(String sql, Object... args);

	Connection getConn();

	void returnConnection(Connection conn);

	void rollBack(Connection conn);
}
